package com.cyt.work.divideclass.model.po;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.cyt.base.util.BaseUtil;
import com.cyt.base.util.DictCode;
import com.cyt.sys.model.po.SysUser;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

/**
 * 智能分班学生表,分班时导入的学生信息-智能分班学生实体类
 *
 * @author caideyong
 * @date 2019-12-20 14:24:31
 */
@Data
@NoArgsConstructor
@Table(name = "cyt_divideclass_student")
public class DivideclassStudent implements Serializable {

	/**
     * 主键
     */ 
	@Id
	private String id;

	/**
     * 学号
     */ 
	@Column(name = "XH")
	@Excel(name="学号",orderNum = "1")
	private String xh;

	/**
     * 姓名
     */ 
	@Column(name = "NAME")
	@Excel(name="姓名",orderNum = "2")
	private String name;

	/**
     * 性别
     */ 
	@Column(name = "SEX")
	@Excel(name="性别",orderNum = "3",replace = {"男_1", "女_2"})
	private String sex;

	/**
     * 来源学校
     */ 
	@Column(name = "SCHOOL")
	@Excel(name="来源学校",orderNum = "5")
	private String school;

	/**
     * 删除标志
     */ 
	@Column(name = "REMOVE_TAG")
	private String removeTag;

	/**
     * 创建时间
     */ 
	@Column(name = "CREATE_TIME")
	private Date createTime;

	/**
     * 创建人
     */ 
	@Column(name = "CREATOR")
	private String creator;

	/**
     * 总分
     */ 
	@Column(name = "TOTAL_SCORE")
	@Excel(name="总分",orderNum = "4")
	private String totalScore;

	/**
     * 班级id
     */ 
	@Column(name = "CLASS_ID")
	private String classId;

	/**
     * 分班id
     */ 
	@Column(name = "DIVIDE_ID")
	private String divideId;

	/**
     * 用户id
     */ 
	@Column(name = "USER_ID")
	private String userId;

	@Transient
	private String schoolNum;

	@Transient
	private String eduUser;

	/**
	 * 创建对象
	 *
	 * @param sysUser 当前用户信息
	 * @author caideyong
	 * @date 2019-12-20 14:24:31
	 */
	public DivideclassStudent(SysUser sysUser) {
		this.id = BaseUtil.uId();
		this.removeTag = DictCode.BASE_REMOVE_TAG_NORMAL;
		this.createTime = new Date();
		this.creator = sysUser.getId();
	}
}